﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Test.DAL;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        using (System.Transactions.TransactionScope tran = new System.Transactions.TransactionScope())
        {
            Test.DAL.CMS_ARTICAL artc = new CMS_ARTICAL();
            artc.ARTICAL_ID = 10092;
            artc.ARTICAL_CONTENT = "嘿嘿1111111111111";
            artc.Save();
            tran.Complete();
        }
        Test.DAL.DataClassesTestDataContext db = new DataClassesTestDataContext();
        var gg = from g in db.CMS_ARTICAL where g.ARTICAL_ID == 10092 select g;
        var g2 = gg.SingleOrDefault();
        if (g2 != null)
        {
            Response.Write(g2.ARTICAL_CONTENT);
        }
        else
        {
            Response.Write("空");
        }
    }
}
